<!doctype html>
<html lang="en">

<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">

  <!-- IE11 compatibility -->
  <script src="/node_modules/promise-polyfill/dist/polyfill.min.js"></script>

  <script src="../dist/sweetalert2.js"></script>
  <link rel="stylesheet" href="../dist/sweetalert2.css">
</head>

<body>
<script>
  Swal({
    title: 'Test modal with input',
    html: 'custom <strong>content</strong>',
    input: 'text',
    type: 'success',
    showCloseButton: true,
    showCancelButton: true,
    preConfirm: function (value) {
      if (!value) {
        Swal.showValidationError('Should not be empty!')
      }
    },
    onOpen: function (modal) {
      console.log(modal)
    }
  }).then(function (result) {
    console.log(result)
  })
</script>
</body>
</html>
